﻿package src.game.elements {
	import src.game.GameEvent;
	public class DestroyableBlock extends GameElement{
		public function DestroyableBlock() {
			// constructor code
		}
		
		public override function onHit():void {
			this.alpha = Math.max(this.alpha -= .25, 0);
			if (this.alpha == 0) dispatchEvent(new GameEvent(GameEvent.REMOVE_OBJECT, true, false));
		}

	}
	
}
